import java.util.Scanner;

//斐波那契数列的第n项。(迭代实现)
public class Math {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int input = sc.nextInt();
        int f1 = 1;
        int f2 = 1;
        int f3 = -1;
        if (input == 1 || input == 2) {
            f3 = 1;
        }
        for (int i = 3; i <= input; i++) {
            f3 = f1 + f2;
            f1 = f2;
            f2 = f3;
        }
        System.out.println(f3);
    }
}
